package com.seres.config.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.seres.vo.BaseTree;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.Date;
import java.util.List;

/**
 * @author Tan-Bowen
 * @version 1.0
 * @description TODO
 * @date 2021/9/23 12:00
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@ApiModel("菜单信息树")
@NoArgsConstructor
@AllArgsConstructor
public class MenuTree extends BaseTree<MenuTree> {

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("父级id")
    private Long pid;

    @ApiModelProperty("0 菜单, 1 功能接口")
    private Integer type;

    @ApiModelProperty("路径")
    private String path;

    @ApiModelProperty("全路由")
    private String router;

    @ApiModelProperty("权限标识")
    private String permissions;

    @ApiModelProperty("绑定的接口")
    private String url;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("1启用 0禁用")
    private Integer state;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("创建人")
    private Long createUser;

    @ApiModelProperty("子级")
    private List<MenuTree> children;

}


